package com.unionpay.logan.controller;

/**
 * Created by wxj on 2018/11/27 17:13
 */

public class BaseResponse<T> {
    private String code;

    private String msg;

    private BaseResponse(Builder builder) {
        setCode(builder.code);
        setMsg(builder.msg);
    }

    public String getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }


    public static final class Builder {
        private String code;
        private String msg;

        public Builder() {
        }

        public Builder code(String val) {
            code = val;
            return this;
        }

        public Builder msg(String val) {
            msg = val;
            return this;
        }

        public BaseResponse build() {
            return new BaseResponse(this);
        }
    }
}
